1. Field of the Invention
The present invention relates to a method, system, and program for returning a file initially requested through a network connection and, in particular, returning the requested file through the network connection or the file system.
2. Description of the Related Art
The International Business Machines Corporation""s (IBM) Tivoli Storage Manager (TSM), formerly known as the ADSTAR Distributed Storage Manager (ADSM), is a client-server program that provides storage management operations between one or more clients and a server. The TSM server program allows numerous clients to backup, archive, and migrate data residing in the client workstations, including data in databases and applications. The server program manages backup versions of files, archived copies of files, and migrated files. The TSM server program also selects the storage devices to use to backup the data. The TSM client component configures the client workstation to function as a client node to the TSM server. This allows the client to backup, archive, restore, and retrieve files through the server program in the server. TSM operates independently of human intervention to manage the storage environment and space in a network system.
A client computer can perform TSM client backup, archive, hierarchical storage management, and restore operations using the TSM specific graphical user interface (GUI) or a command line interface. Current versions of TSM include a web client applet, which allows a user to access the TSM client through a Web browser. A common Web browser may be used to perform storage management functions at the client computer, e.g., backup client data to the server. To access the web client applet from a remote machine, the user would direct the web browser at the remote machine to the TSM client which runs its own Hypertext Transfer Protocol (HTTP) server. The remote web browser would then run the web client applet to access the TSM client to perform such TSM client operations as determining status of backup operations, incremental and selective backup of new and changed files, and restore operations.
To access the web client on the TSM client, the remote web browser would issue an HTTP GET request for the uniform resource locator (URL) in the form of xe2x80x9chttp://YourMachineName:PortNumber.xe2x80x9d The web client applet can be served from many different client systems, including AIX, OS/2, SUN SOLARIS, HP-UX, WINDOWS NT and WINDOWS 95.** Further details of the current TSM clients are described in the IBM publication, xe2x80x9cADSTAR Distributed Storage Manager: Installing the Clients.Version 3,xe2x80x9d IBM document no. SH26-4080-02 (Copyright IBM, 1999), which publication is incorporated herein by reference in its entirety.
Currently, a web browser requests the web client applet each time the web browser wants to establish communication with the TSM client to perform storage management operations. This requires that the TSM client send the web client over the network connection to the web browser each time the web browser wants to establish a session with the TSM client. There is a need in the art for improved mechanisms for serving requested files, such as the web client applet, to the requesting web browser.
To overcome the limitations in the prior art described above, preferred embodiments disclose a system, method, and program for processing a file request from an application program. A file is maintained in a storage device accessible to a computer system. The file is capable of being accessed through a file system. A network connection is established with the application program using a network protocol. A request for the file is received from the application program via the network connection. A determination is then made as to whether the application program is executing in the computer system including the file system. If not, the file is transmitted over the network connection to the application program. Otherwise, the file is provided to the application program through the file system.
The network connection with the application program may be established using the TCP/IP protocol and the request for the file may be transmitted using the HTTP protocol. Further, the requested file may be a Java applet, HTML file, text file, image file, video file, XML file or program.
In further embodiments, the application program is a web browser. In such case, providing the web browser the file through the file system comprises returning a file to the web browser including a pathname of the requested file in the storage device. The web browser accesses the requested file through the file system using the pathname provided in the returned file.
Preferred embodiments further provide a method for interfacing with a storage management system in a computer system with an application program. A network connection is established with the application program using a network protocol. A request is received from the application program for a program in a storage device accessible to the computer system. The requested program is capable of being accessed through a file system. The program will allow the application program to interface with the storage management system. The requested program is transmitted to the application program via the network connection using the network protocol or directly to the application program through the file system. The application program executes the requested program to provide an interface with the storage management system to perform storage management operations on the computer system.
Preferred embodiments provide a mechanism for determining how to return a requested file to a requesting program, such as a web browser, based on the location of the web browser. If the web browser is communicating over a network communication line from a remote location, then the server will return the requested file using the network communication line and network protocols, such as TCP/IP and HTTP. However, if the server determines that the web browser initiating the request through the network connection is executing locally, then the server will return a page including a link to the pathname where the requested file is locally stored. The web browser will then submit a second request using the pathname to access the requested file through the file system. This method substantially improves performance by using the file system instead of network communications and network protocols to return a requested file. Performance improvements increase as the size of the requested file increases. Preferred embodiments utilize the fastest available method for returning requested files to a web browser or other application program requesting files through a network connection.